<template>
    <div class="public-common">
        <!--承包人信息管理-->
        <div class="public-title">承包人列表</div>
        <div style="padding:10px;">
            <el-row>
                <el-col :span="6">
                    <el-input placeholder="请输入内容" v-model="form.test" class="input-with-select"/>
                        
                </el-col>
                <el-col :span="18">
                    <el-button type="primary" icon="el-icon-search" style="margin-left:10px;">搜索</el-button>
                    <el-button type="success" icon="el-icon-edit-outline">新建</el-button>
                    <el-button type="danger" icon="el-icon-delete">删除</el-button>
                    <el-button type="warning" icon="el-icon-paperclip">导入数据</el-button>
                </el-col>
            </el-row>
        </div>
        <el-table :data="tabledata" size="mini" border stripe header-row-class-name="textcenter">
            <el-table-column
            type="selection"
            width="55" fixed="left">
            </el-table-column>
            <el-table-column
                label="姓名">
                <template slot-scope="scope">
                    {{scope.row.companyName}}
                </template>
            </el-table-column>
            <el-table-column
                label="性别">
                <template slot-scope="scope">
                    {{scope.row.carId}}
                </template>
            </el-table-column>                
            <el-table-column
                label="所属单位">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="照片">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="出生日期">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="民族">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="籍贯">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="文化程度">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="身份证号">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="现住址">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="联系电话">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="驾驶证编号">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="准驾车型">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="初次领证日期">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="驾驶证过期日期">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="使用状态">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="创建人">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="创建时间">
                <template slot-scope="scope">
                    {{scope.row.carType}}
                </template>
            </el-table-column>
            <el-table-column
                label="操作" fixed="right">
                <template slot-scope="scope">
                    <el-button type="primary" size="mini">编辑</el-button>
                </template>
            </el-table-column> 
            
        </el-table>
        <el-pagination
        @size-change="handleSizeChange"
        @current-change="handleCurrentChange"
        :current-page="page.now"
        :page-sizes="page.sizes"
        :page-size="page.pagesize"
        layout="total, sizes, prev, pager, next, jumper"
        :total="page.total" style="margin-top:10px;">
        </el-pagination>
        <!--dialog-->
        <el-dialog title="承包人信息"  :visible.sync="dialog.isVisible" width="60%">
            <el-scrollbar style="height:350px;">
            <el-form label-width="120px" size="mini">
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="姓名">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="15">
                        <el-form-item label="上传照片">
                            <el-upload
                            class="upload-demo"
                            action="#"
                            :limit="1"
                            :auto-upload="false"
                            :show-file-list="false"
                            :on-change="uploadImg">
                            <el-button size="mini" type="primary">点击上传</el-button>
                            <!-- <div slot="tip" class="el-upload__tip" style="line-height:18px;">建议照片大小为小2寸最佳(长×宽为45mm×35mm)</div> -->
                            </el-upload>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="所属单位">
                            <el-select v-model="dialog.name" placeholder="请选择">
                                <el-option
                                v-for="item in select.companys"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="15">
                        <el-form-item label="照片">
                            <div style="position:absolute;">
                                <img src="http://113.140.71.251:8009/Resources/nophoto.jpg" alt="" style="width:110px;height:146px;float:left">
                                <div style="margin-left:120px;margin-top:30px;line-height:22px;">建议照片大小为小2寸最佳<br>(长×宽为45mm×35mm)</div>
                            </div>                            
                        </el-form-item>
                    </el-col>
                </el-row>  
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="性别">
                            <el-select v-model="dialog.name" placeholder="请选择">
                                <el-option
                                v-for="item in select.sexs"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="出生日期">
                            <el-date-picker
                            v-model="dialog.name"
                            type="date"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期" style="width:100%;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="民族">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="籍贯">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="文化程度">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="驾驶证编号">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="身份证号">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="准驾车型">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="现住址">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="初次领证日期">
                            <el-date-picker
                            v-model="dialog.name"
                            type="date"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期" style="width:100%;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="联系电话">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="驾驶证过期日期">
                            <el-date-picker
                            v-model="dialog.name"
                            type="date"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期" style="width:100%;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="作废时间">
                            <el-date-picker
                            v-model="dialog.name"
                            type="date"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期" style="width:100%;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="作废人">
                            <el-input v-model="dialog.name"></el-input>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="承包车辆">
                            <div style="position:absolute;">
                                
                                <el-tooltip content="此项数据请通过车辆承包合同进行数据维护" placement="top">
                                    <el-input type="textarea" :rows="3" v-model="dialog.name" readonly placeholder="此项数据请通过车辆承包合同进行数据维护"></el-input>
                                </el-tooltip>
                            
                            </div>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="创建时间">
                            <el-date-picker
                            v-model="dialog.name"
                            type="date"
                            format="yyyy-MM-dd"
                            value-format="yyyy-MM-dd"
                            placeholder="选择日期" style="width:100%;">
                            </el-date-picker>
                        </el-form-item>
                    </el-col>
                </el-row>
                <el-row>
                    <el-col :span="9">
                        <el-form-item label="创建人">
                            <el-select v-model="dialog.name" placeholder="请选择">
                                <el-option
                                v-for="item in select.creaters"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                    <el-col :span="9">
                        <el-form-item label="使用状态">
                            <el-select v-model="dialog.name" placeholder="请选择">
                                <el-option
                                v-for="item in select.useStates"
                                :key="item.value"
                                :label="item.label"
                                :value="item.value">
                                </el-option>
                            </el-select>
                        </el-form-item>
                    </el-col>
                </el-row>                          
            </el-form>
            </el-scrollbar>
            <div class="textcenter" style="padding-top:10px;">
                <el-button type="primary" size="mini">确定</el-button>  
                <el-button type="info" @click="dialog.isVisible = false" size="mini">返回</el-button>  
            </div>
        </el-dialog>
    </div>
</template>
<script>
export default {
    data(){
        return {
            form:{
                test:'',
                carid:''
            },
            tabledata:[
                {carId:1}
            ],
            page:{
              now:1,
              pagesize:10,
              sizes:[2,10, 20, 50, 100],
              total:0,
              key:''
            },
            detaildata:[],
            dialog:{
                isVisible:false,
                name:''
            },
            select:{
                companys:[],
                sexs:[
                    {label:"男",value:'男'},
                    {label:"女",value:'女'}
                ],
                creaters:[],
                useStates:[
                    {label:"启用",value:'启用'},
                    {label:"禁用",value:'禁用'}
                ]
            }
        }
    },
    mounted(){
        
    },
    methods:{
        uploadImg(file, fileList){
            console.log(214,file)
        },
        search(){
            alert("search")
        },
        //分页
        handleSizeChange(pagesize){
            this.page.pagesize = pagesize;
            this.search(true,true);
        },
        handleCurrentChange(pageno){
            this.page.now = pageno;
            this.search(true,true);
        }

    }
}
</script>
<style lang="scss">
$Color:#15428F;
$Bgnavtab:rgba(255,255,255,.5);
$BgHeader:#DFE8F6;
$BorderColor:#99bbe8;
.public-common{
    padding: 20px;
    .public-title{line-height: 30px;background-color: #deecfd;padding:0 10px;color:$Color; }
}
</style>